package com.wwj.core.wawa.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wwj.core.wawa.entity.LogWaWaAdjust;
import com.wwj.core.wawa.entity.mapper.LogWaWaAdjustMapper;
import com.wwj.core.wawa.service.ILogWaWaAdjustService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * Created by Auser on 2017/11/21.
 */
@Service
public class LogWaWaAdjustServiceImpl implements ILogWaWaAdjustService {

    @Resource
    private LogWaWaAdjustMapper logWaWaAdjustMapper;

    @Override
    public Page<LogWaWaAdjust> findByPage(Map<String, Object> params, int offset, int limit) {
        PageHelper.offsetPage(offset,limit);
        return (Page<LogWaWaAdjust>)logWaWaAdjustMapper.findByPage(params);
    }

    @Override
    public void addLogWaWaAdjust(LogWaWaAdjust logWaWaAdjust) throws Exception {
        logWaWaAdjustMapper.addLogWaWaAdjust(logWaWaAdjust);
    }
}
